package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.entity.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BrandMapper extends BaseMapper<Brand> {
    @Select("SELECT b.`id`,b.`image`,b.`letter`,b.`name` FROM tb_brand b INNER JOIN tb_category_brand t ON b.`id`=t.`brand_id` WHERE t.`category_id`=#{cid}")
    List<Brand> queryBrandByCategory(Long id);
}
